{% extends 'base/base.html' %}

{% block title %}
    交易统计
{% endblock %}

{% block head %}
{% endblock %}

{% block main_content %}

    <form action="" method="get">
            <div class="form-group">
                <div class="row">
                  <div class="col-lg-4">
                    <div class="input-group">
                      <input type="text" class="form-control" name="user_id" placeholder="请输入用户id或手机号">
                      <span class="input-group-addon">
                        <input type="submit" value="立即搜索">
                      </span>
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
                </div><!-- /.row -->
            </div>
        </form>


    <table class="table table-bordered">
        <thead>
            <tr>
                <th>时间</th>
                <th>用户id</th>
                <th>用户名</th>
                <th>用户等级</th>
                <th>商品</th>
                <th>买卖</th>
                <th>数量</th>
                <th>金额</th>
                <th>成交类型</th>
            </tr>
        </thead>
        <tbody>
            {% for i in deal_list %}
                <tr>
                    <td>{{ i._today }}</td>
                    <td>{{ i.user_id }}</td>
                    <td>{{ i.username }}</td>
                    <td>{{ i.user_level }}</td>
                    <td>{{ i.d_name }}</td>
                    <td>{{ i.t_type }}</td>
                    <td>{{ i.d_num }}</td>
                    <td>{{ i.d_price }}</td>
                    <td>{{ i.d_type }}</td>
                </tr>
            {% endfor %}

        </tbody>
    </table>
    {%if pagination%}
        <div class="pagination-link" style="text-align: center">{{ pagination.links }}</div>
    {% endif %}
{% endblock %}